#!/bin/bash
LANG=en_US.UTF-8
#PJ小宇
path=/usr/YMD/config/config.sh
function Welcome() {
   
   echo -e '#####################################################'
   echo -e ''
   echo -e "      请选择你的操作\n"
   echo -e "      1   更换快手极速版cookie（多个cookie用@隔开）\n"
   echo -e "      2   更换快手普通版cookie（多个cookie用@隔开）\n"
   echo -e "      3   更换酷狗大字版cookie（多个cookie用@隔开）\n"
   echo -e "      4   退出当前\n"
   echo -e "      当前系统时间  $(date +%Y-%m-%d) $(date +%H:%M)"
   echo -e ''
   echo -e '#####################################################'
   echo -e '请输入你的操作选项：'
   read -n1 LINUX_TYPE
   case  $LINUX_TYPE in
   1 )
      read -p "请输入你的快手极速版cookie:" i
      sed -i '/ksjsbCookie=/d' $path
      sed -i "5a export ksjsbCookie=\'$i\'" $path
      #获取token
      echo -e "\n快手极速版cookie已完成\n"
         name=YMD_ksjsb
         INSTALLATION_CLONE
      ;;
   2 )
      read -p "请输入你的快手cookie:" i
      sed -i '/ksCookie=/d' $path
      sed -i "5a export ksCookie=\'$i\'" $path
      #获取token
      echo -e "\n快手cookie已完成\n"
         name=YMD_ks
         INSTALLATION_CLONE
      ;;  
   3 )
      read -p "请输入你的酷狗大字版cookie（ 参考教程 https://www.bilibili.com/video/BV1EA4y1D78t ）:" i
      sed -i '/kugouurl=/d' $path
      sed -i "5a export kugouurl=\'$i\'" $path
      #获取token
      echo -e "\n酷狗大字版cookie已完成\n"
         name=YMD_kgdzb
         INSTALLATION_CLONE
      ;;  
    * )
      echo  "   退出当前";;
   esac
}
function INSTALLATION_CLONE() {
echo -e "\033[31m  现在执行 bash /usr/YMD/env.sh ${name} 看看吧！ \033[0m"
}

Welcome